// 组件自动引入插件
import Components from 'unplugin-vue-components/vite'
// ArcoVue、VueUse 组件和指令自动引入解析器
import {
    ArcoResolver,
    VueUseComponentsResolver,
    VueUseDirectiveResolver
} from 'unplugin-vue-components/resolvers'

export default function createComponents() {
    return Components({
        dirs: ['src/components/'],
        include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
        resolvers: [
            ArcoResolver({
                sideEffect: true
            }),
            VueUseComponentsResolver(),
            VueUseDirectiveResolver()
        ]
    })
}
